<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

function generate_theme_xml($admin_id, $franchise_title, $franchise_type, $franchise_theme){
    $data = "<SiteTitle>%s</SiteTitle>
<SiteType>%s</SiteType>
<SiteTheme>%s<SiteTheme>";
    $data = sprintf($data, $franchise_title, $franchise_type, $franchise_theme);
    
    $path = APPPATH."assets/products/$admin_id";
    
    if(!is_dir($path))
        mkdir($path, 0700);
    
    file_put_contents($path.'/config.xml', $data);
}
?>